package reflect;

import java.sql.SQLOutput;

public class Worker {
    private String name;
    private int age;

    public Worker(){
        this.name = "张三";
        this.age = -1;
    }
    public Worker(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void work(){
        System.out.println("工作");
    }
    public void workWith(String other){
        System.out.println(name +"和"+ other +"工作");
    }
    public String hello(String str,int num){
        return str + "," + num;
    }

    private void dosome(int num){
        System.out.println(num);
    }


    @Override
    public String toString() {
        return "Worker{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
